//
//  NSString+ZJURL.m
//  Fish
//
//  Created by JL on 15/9/9.
//  Copyright (c) 2015年 zjtdmac3. All rights reserved.
//

#import "NSString+URL.h"

@implementation NSString (URL)

#define BaseURL @""
- (NSString *)getURL
{
    if ([self hasPrefix:@"http://"]) {
        return self;
    }else{
        if ([self hasPrefix:@"/"]) {
            return [NSString stringWithFormat:@"%@%@",BaseURL,self];
        }else{
            return [NSString stringWithFormat:@"%@/%@",BaseURL,self];
        }
    }
}
@end
